<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Loading Modal with Blur Effect</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
            color: #fff;
            min-height: 100vh;
            padding: 20px;
            overflow-x: hidden;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        
        header {
            text-align: center;
            margin-bottom: 40px;
            padding: 20px;
        }
        
        h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            text-shadow: 0 2px 10px rgba(0,0,0,0.3);
        }
        
        .subtitle {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 600px;
            margin: 0 auto;
        }
        
        .content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            margin-bottom: 40px;
            transition: filter 0.4s ease;
        }
        
        .card {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s ease;
        }
        
        .card:hover {
            transform: translateY(-10px);
        }
        
        .card-img {
            height: 200px;
            background-size: cover;
            background-position: center;
        }
        
        .card-content {
            padding: 25px;
        }
        
        .card h3 {
            font-size: 1.5rem;
            margin-bottom: 10px;
        }
        
        .card p {
            line-height: 1.6;
            opacity: 0.85;
        }
        
        .controls {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 40px 0;
        }
        
        .btn {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: none;
            padding: 15px 40px;
            font-size: 1.1rem;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }
        
        .btn:hover {
            background: rgba(255, 255, 255, 0.25);
            transform: translateY(-3px);
        }
        
        .btn:active {
            transform: translateY(1px);
        }
        
        /* Loading Modal */
        .loading-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .loading-modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .loader {
            width: 80px;
            height: 80px;
            position: relative;
        }
        
        .loader-inner {
            position: absolute;
            width: 100%;
            height: 100%;
            border: 5px solid transparent;
            border-top-color: #3498db;
            border-radius: 50%;
            animation: spin 1.5s linear infinite;
        }
        
        .loader-inner:nth-child(2) {
            border-top-color: #e74c3c;
            animation-delay: 0.2s;
        }
        
        .loader-inner:nth-child(3) {
            border-top-color: #2ecc71;
            animation-delay: 0.4s;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .loading-text {
            color: white;
            margin-top: 20px;
            font-size: 1.3rem;
            text-align: center;
            letter-spacing: 2px;
            font-weight: 300;
        }
        
        .loading-content {
            text-align: center;
        }
        
        .blur-effect {
            filter: blur(5px);
            overflow: hidden;
        }
        
        body.no-scroll {
            overflow: hidden;
        }
        
        footer {
            text-align: center;
            padding: 30px;
            margin-top: 20px;
            opacity: 0.7;
            font-size: 0.9rem;
        }
    </style>
</head>
<body>
    <div class="container">
        <header>
            <h1>Loading Modal with Blur Effect</h1>
            <p class="subtitle">当加载状态激活时, 内容区域将变得模糊且不可滚动。点击下方按钮体验效果。</p>
        </header>
        
        <div class="content" id="contentArea">
            <div class="card">
                <div class="card-img" style="background: linear-gradient(to right, #ff416c, #ff4b2b);"></div>
                <div class="card-content">
                    <h3>现代网页设计</h3>
                    <p>探索最新的网页设计趋势和技术, 创建令人惊叹的用户体验。从响应式布局到交互动画, 现代网页设计融合了美学与功能。</p>
                </div>
            </div>
            
            <div class="card">
                <div class="card-img" style="background: linear-gradient(to right, #11998e, #38ef7d);"></div>
                <div class="card-content">
                    <h3>CSS动画效果</h3>
                    <p>使用CSS创建流畅的动画效果, 增强用户交互体验。从简单的过渡到复杂的关键帧动画, 为您的网站增添活力。</p>
                </div>
            </div>
            
            <div class="card">
                <div class="card-img" style="background: linear-gradient(to right, #4568dc, #b06ab3);"></div>
                <div class="card-content">
                    <h3>JavaScript交互</h3>
                    <p>通过JavaScript实现动态内容加载和用户交互功能。学习如何创建响应式的UI组件和高效的前端架构。</p>
                </div>
            </div>
        </div>
        
        <div class="controls">
            <button class="btn" id="showLoading">显示加载效果</button>
            <button class="btn" id="hideLoading">隐藏加载效果</button>
        </div>
        
        <footer>
            <p>移动端和桌面端均可使用 | 点击上方按钮体验模糊加载效果</p>
        </footer>
    </div>
    
    <div class="loading-modal" id="loadingModal">
        <div class="loading-content">
            <div class="loader">
                <div class="loader-inner"></div>
                <div class="loader-inner"></div>
                <div class="loader-inner"></div>
            </div>
            <div class="loading-text">加载中, 请稍候...</div>
        </div>
    </div>
    
    <script>
        const loadingModal = document.getElementById('loadingModal');
        const contentArea = document.getElementById('contentArea');
        const showBtn = document.getElementById('showLoading');
        const hideBtn = document.getElementById('hideLoading');
        const body = document.body;
        
        showBtn.addEventListener('click', () => {
            loadingModal.classList.add('active');
            contentArea.classList.add('blur-effect');
            body.classList.add('no-scroll');
        });
        
        hideBtn.addEventListener('click', () => {
            loadingModal.classList.remove('active');
            contentArea.classList.remove('blur-effect');
            body.classList.remove('no-scroll');
        });
        
        // 模拟长时间加载效果
        showBtn.addEventListener('click', () => {
            setTimeout(() => {
                if(loadingModal.classList.contains('active')) {
                    hideBtn.click();
                }
            }, 3000);
        });
    </script>
</body>
</html>